<admintpl file="header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:U('WeixinBroads/index')}">群发管理</a></li>
			<li><a href="{:U('WeixinBroads/add')}">{:L('WX_BROADS')}</a></li>
		</ul>
		<!-- 
		<form class="well form-search" method="post" action="{:U('AdminPage/index')}">
			{:L('POST_DATE')}
			<input type="text" name="start_time" class="js-date" value="{$formget.start_time}" style="width: 80px;" autocomplete="off">-
			<input autocomplete="off" type="text" class="js-date" name="end_time" value="{$formget.end_time}" style="width: 80px;"> {:L('KEYWORD')}
			<input type="text" name="keyword" style="width: 200px;" value="{$formget.keyword}" placeholder="{:L('PLEASE_ENTER_KEYWORD')}">
			<button class="btn btn-primary">{:L('SEARCH')}</button>
		</form>
		 -->
		<form class="js-ajax-form" method="post">
			<div class="table-actions">
				<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('WeixinBroads/delete')}" data-subcheck="true" data-msg="{:L('DELETE_CONFIRM_MESSAGE')}">{:L('DELETE')}</button>
			</div>
			<table class="table table-hover table-bordered table-list">
				<thead>
					<tr>
						<th width="16"><label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label></th>
						<th width="100">ID</th>
						<th>{:L('SEND_MEDIA')}</th>
						<!-- <th>点击量</th> -->
						<th width="100">{:L('SEND_TYPE')}</th>
						<th width="100">{:L('NEWS_TYPE')}</th>
						<th width="100">{:L('SEND_STATE')}</th>
						<th width="120"><span>{:L('SEND_TIME')}</span></th>
						<th width="120">{:L('ACTIONS')}</th>
					</tr>
				</thead>
				<foreach name="send_list" item="vo">
				<tr>
					<td><input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]" value="{$vo.id}"></td>
					<td><a>{$vo.id}</a></td>
					<td><a href="{:U('WeixinBroads/edit',array('id'=>$vo['id']))}"><span>{$vo.media_id}</span></a></td>
					<!--  <td>0</td> -->
					<td><if condition="$vo['send_type'] eq 1">分组<else/>所有人</if></td>
					<td>{$msg_type[$vo['msgtype']]}</td>
					<td><if condition="$vo['status'] eq 1">发送成功<else/>未发送</if></td>
					<td>{$vo.sendtime|date='Y-m-d H:i',###}</td>
					<td>
						<a href="{:U('WeixinBroads/edit',array('id'=>$vo['id']))}">{:L('EDIT')}</a> |
						<a href="{:U('WeixinBroads/delete',array('id'=>$vo['id']))}" class="js-ajax-delete">{:L('DELETE')}</a>
					</td>
				</tr>
				</foreach>
				<tfoot>
					<tr>
						<th width="16"><label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label></th>
						<th width="100">ID</th>
						<th>{:L('SEND_MEDIA')}</th>
						<!-- <th>点击量</th> -->
						<th width="100">{:L('SEND_TYPE')}</th>
						<th width="100">{:L('NEWS_TYPE')}</th>
						<th width="100">{:L('SEND_STATE')}</th>
						<th width="120"><span>{:L('SEND_TIME')}</span></th>
						<th width="120">{:L('ACTIONS')}</th>
					</tr>
				</tfoot>
			</table>
			<div class="table-actions">
				<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('WeixinBroads/delete')}" data-subcheck="true" data-msg="你确定删除吗？">{:L('DELETE')}</button>
			</div>
			<div class="pagination">{$Page}</div>
		</form>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
	<script>
		setCookie('refersh_time', 0);
		function refersh_window() {
			var refersh_time = getCookie('refersh_time');
			if (refersh_time == 1) {
				window.location.reload();
			}
		}
		setInterval(function() {
			refersh_window()
		}, 2000);
	</script>
</body>
</html>